package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HurtFollowRecordMapper;
import com.ruoyi.business.domain.HurtFollowRecord;
import com.ruoyi.business.service.IHurtFollowRecordService;

/**
 * 随访记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-19
 */
@Service
public class HurtFollowRecordServiceImpl implements IHurtFollowRecordService
{
    @Autowired
    private HurtFollowRecordMapper hurtFollowRecordMapper;

    /**
     * 查询随访记录
     *
     * @param id 随访记录主键
     * @return 随访记录
     */
    @Override
    public HurtFollowRecord selectHurtFollowRecordById(Long id)
    {
        return hurtFollowRecordMapper.selectHurtFollowRecordById(id);
    }

    /**
     * 查询随访记录列表
     *
     * @param hurtFollowRecord 随访记录
     * @return 随访记录
     */
    @Override
    public List<HurtFollowRecord> selectHurtFollowRecordList(HurtFollowRecord hurtFollowRecord)
    {
        return hurtFollowRecordMapper.selectHurtFollowRecordList(hurtFollowRecord);
    }

    /**
     * 新增随访记录
     *
     * @param hurtFollowRecord 随访记录
     * @return 结果
     */
    @Override
    public int insertHurtFollowRecord(HurtFollowRecord hurtFollowRecord)
    {
        return hurtFollowRecordMapper.insertHurtFollowRecord(hurtFollowRecord);
    }

    /**
     * 修改随访记录
     *
     * @param hurtFollowRecord 随访记录
     * @return 结果
     */
    @Override
    public int updateHurtFollowRecord(HurtFollowRecord hurtFollowRecord)
    {
        return hurtFollowRecordMapper.updateHurtFollowRecord(hurtFollowRecord);
    }

    /**
     * 批量删除随访记录
     *
     * @param ids 需要删除的随访记录主键
     * @return 结果
     */
    @Override
    public int deleteHurtFollowRecordByIds(Long[] ids)
    {
        return hurtFollowRecordMapper.deleteHurtFollowRecordByIds(ids);
    }

    /**
     * 删除随访记录信息
     *
     * @param id 随访记录主键
     * @return 结果
     */
    @Override
    public int deleteHurtFollowRecordById(Long id)
    {
        return hurtFollowRecordMapper.deleteHurtFollowRecordById(id);
    }

    @Override
    public Map<String, Object> getNextFollow(Long patientId) {
        return hurtFollowRecordMapper.getNextFollow(patientId);
    }

    @Override
    public List<Map<String, Object>> getHistoryFollowList(Long patientId) {
        return hurtFollowRecordMapper.getHistoryFollowList(patientId);
    }

    @Override
    public List<Map<String, Object>> getPatientFollowList(Long patientId) {
        return hurtFollowRecordMapper.getPatientFollowList(patientId);
    }
}
